﻿<%@ Control Language="C#" AutoEventWireup="True" Inherits="Controls_LoginPanel" Codebehind="LoginPanel.ascx.cs" %>
<div class="divLoginHeader">
    <h2>Вхід на сайт</h2>
</div>
<div class="divLoginBody">    
    <table>
    <tr>
        <td>
            <asp:Login ID="universityLogin" FailureText="Невірний логін або пароль!!!" runat="server" TitleText="" PasswordRecoveryText="Забули пароль?" DestinationPageUrl="~/TestSystem/Subjects.aspx">
            <FailureTextStyle CssClass="incorrect" />
            <CheckBoxStyle CssClass="login" />
            <ValidatorTextStyle CssClass="incorrect" />
            <LabelStyle CssClass="login" />
            <LayoutTemplate>
            <table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse">
            <tr>
                <td>
                    <table border="0" cellpadding="0">
                        <tr>
                            <td align="right" class="login">
                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Логін:</asp:Label></td>
                            <td>
                                <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                CssClass="incorrect" ErrorMessage="User Name is required." ToolTip="User Name is required."
                                ValidationGroup="universityLogin">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="login">
                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Пароль:</asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="Password" runat="server" TextMode="Password" EnableViewState="False"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                CssClass="incorrect" ErrorMessage="Password is required." ToolTip="Password is required."
                                ValidationGroup="universityLogin">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="incorrect" colspan="2" style="color: red">
                                <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Залогуйтеся" ValidationGroup="universityLogin" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:HyperLink ID="PasswordRecoveryLink" runat="server" NavigateUrl="~/TestSystem/RecoverPassword.aspx">Забули пароль?</asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        </LayoutTemplate>
        </asp:Login>
    </td>
    </tr> 
    <tr>
        <td width="100%" class="link">
            <asp:Hyperlink ID="createUserHyperLink" Text="Зареєструватись" runat="server" NavigateUrl="~/TestSystem/CreateUser.aspx"></asp:Hyperlink>
        </td>
    </tr>
    </table>
</div>
